package com.rainyun.rc.command;

import java.util.LinkedHashMap;
import java.util.Map;

/**指令参数集
 * */
public class CmdArgs {
	
	/**传统的参数数组,储存着用户直接输入的所有参数*/
	String[] args = new String[0];
	
	/**对应<player>,<name>等等值型节点接收的值(转换后)*/
	Map<String, Object> values = new LinkedHashMap<String, Object>();
	
	public String[] getArgs() {
		return args;
	}
	public void setArgs(String[] args) {
		this.args = args;
	}
	public Map<String, Object> getMap() {
		return values;
	}
	public void setMap(Map<String, Object> values) {
		this.values = values;
	}
	
	public <T> T get(String key) {
		return (T)values.get(key);
	}
	public void set(String key,Object value) {
		this.values.put(key, value);
	}
	
}
